import 'package:finance_app/src/entities/data_import_entity.dart';

invoiceDataImportEntityFromJson(DataImportEntity data, Map<String, dynamic> json) {
  if (json['Type *'] != null) {
    data.typeStar = json['Type *'].toString();
  }
  if (json['Full Name'] != null) {
    data.fullName = json['Full Name'].toString();
  }
  if (json['Reg. No. (if applicable)'] != null) {
    data.regNo = json['Reg. No. (if applicable)'].toString();
  }
  if (json['Country code'] != null) {
    data.countryCode = json['Country code'].toString();
  }
  if (json['Phone No.'] != null) {
    data.phoneNo = json['Phone No.'].toString();
  }
  if (json['Company Email'] != null) {
    data.companyEmail = json['Company Email'].toString();
  }
  if (json['Website URL'] != null) {
    data.websiteUrl = json['Website URL'].toString();
  }
  if (json['Blk/ Street'] != null) {
    data.blkStreet = json['Blk/ Street'].toString();
  }
  if (json['Unit No.'] != null) {
    data.unitNo = json['Unit No.'].toString();
  }
  if (json['Postal Code'] != null) {
    data.postalCode = json['Postal Code'].toString();
  }
  if (json['Contact Person Name'] != null) {
    data.contactPersonName = json['Contact Person Name'].toString();
  }
  if (json['Contact Person Phone No.'] != null) {
    data.contactPersonPhoneNo = json['Contact Person Phone No.'].toString();
  }
  if (json['Contact Person Email'] != null) {
    data.contactPersonEmail = json['Contact Person Email'].toString();
  }
  if (json['Primary contact'] != null) {
    data.primaryContact = json['Primary contact'].toString();
  }
  if (json['Fax'] != null) {
    data.Fax = json['Fax'].toString();
  }
  if (json['Position'] != null) {
    data.Position = json['Position'].toString();
  }
  if (json['Country'] != null) {
    data.Country = json['Country'].toString();
  }
  if (json['line'] != null) {
    data.line = json['line'];
  }

  return data;
}
